package com.ssy.lingxi.system.model.request;

import com.ssy.lingxi.system.handler.annotation.MenuCodeSourceAnno;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Map;

/**
 * 修改菜单编码接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-01-14
 */
public class MenuCodeUpdateVO implements Serializable {
    private static final long serialVersionUID = -3510906225711961326L;

    /**
     * Id
     */
    @NotNull(message = "菜单编码Id不能为空")
    private Long id;

    /**
     * 编码
     */
    @NotBlank(message = "菜单编码不能为空")
    private String code;

    /**
     * Url
     */
    @NotBlank(message = "菜单编码对应的Url不能为空")
    private String url;

    /**
     * 适用的平台客户端：1-能力中心，2-App，99-平台后台
     */
    @NotNull(message = "适用的平台客户端枚举不能为空")
    @MenuCodeSourceAnno(nullable = false)
    private Integer source;

    /**
     * 属性描述
     */
    @Size(max = 255, message = "属性描述最长255个字符")
    private String remark;

    /**
     * 属性值
     */
    private Map<String, Object> attrs;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Map<String, Object> getAttrs() {
        return attrs;
    }

    public void setAttrs(Map<String, Object> attrs) {
        this.attrs = attrs;
    }
}
